﻿using System;
using System.Collections.Generic;
using System.Text;

namespace LEE.Tools.Regulars
{
    public class RegularString
    {
        /// <summary>
        /// 邮箱格式
        /// </summary>
        public const string Email = @"^\s*([A-Za-z0-9_-]+(\.\w+)*@([\w-]+\.)+\w{2,3})\s*$";

        /// <summary>
        /// 中文
        /// </summary>
        public const string CHINESE_CHARACTERS = "[\u4e00-\u9fa5]";

        /// <summary>
        /// 数字
        /// </summary>
        public const string NUMBER = "^[0-9]*$";

        /// <summary>
        /// 电话号码(格式--"+86-08175414521")
        /// </summary>
        public const string PHONE_NUMBER = @"^\+([0-9]*)-[0-9]*$";

        /// <summary>
        /// 数字、字母、下划线
        /// </summary>
        public const string DIGITAL_LETTERS_UNDERLINE = @"^\w+$";

        /// <summary>
        /// 删除收尾空白字符
        /// </summary>
        public const string REMOVE_BLANK_CHAR = "^s*|s*$";

        /// <summary>
        /// 匹配URL
        /// </summary>
        public const string URL = "^[a-zA-z]+://[^s]*$";

        /// <summary>
        /// IP地址
        /// </summary>
        public const string IPADDRESS = @"((25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d)))\.){3}(25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d)))";
    }

}